﻿function isNumber(oNum) {
    if (!oNum) return false;
    var strP = /^\d+(\.\d+)?$/;
    if (!strP.test(oNum)) return false;
    try {
        if (parseFloat(oNum) != oNum) return false;
    }
    catch (ex) {
        return false;
    }
    return true;
}
function IsLetter(str) {
    var rc = true;
    if (str + "" == "undefined" || str == null) { rc = false; }
    else {
        for (i = 0; i < str.length; i++) {
            if ((str.charAt(i) > 'Z' && str.charAt(i) < 'a') || str.charAt(i) < 'A' || str.charAt(i) > 'z') {
                rc = false;
                break;
            }
        }
    }
    return rc;
}
function InitConfigData() {
    try {
        if (document.all("userName") != null) document.all("userName").innerText = user.username;
        if (document.all("userName1") != null) document.all("userName1").innerText = user.username;
        if (document.all("shopscount") != null) document.all("shopscount").innerText = user.shops;
        if (document.all("keywordscount") != null) document.all("keywordscount").innerText = user.keywords;
        if (document.all("balancePoint") != null) document.all("balancePoint").innerText = user.balancePoint;
        if (document.all("reward_balancePoint") != null) document.all("reward_balancePoint").innerText = user.Setting.RewardBalancePoint;
        if (document.all("Span_Balance") != null) document.all("Span_Balance").innerText = user.balancePoint;
        if (document.all("Span_Pmoney") != null) document.all("Span_Pmoney").innerText = user.Pmoney;
        if (document.all("Span_Lmoney") != null) document.all("Span_Lmoney").innerText = user.Lmoney;
        if (document.all("moneyScale") != null) document.all("moneyScale").innerText = user.Setting.MoneyScale;
    } catch (ex) { }
}
InitConfigData();